﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frm_BuyEdit.aspx.cs" Inherits="SaleSystem.Business.frm_BuyEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <ext:PageManager runat="server" ID="PageManager1" />     
            <Toolbars>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:Button runat="server" ID="bnSave" Icon="SystemSave" Text="保存" ValidateForms="SimpleForm1" OnClick="bnSave_Click">
                        </ext:Button>
                        <ext:Button runat="server" ID="bnImport" Icon="TableEdit" Text="导入"  >
                        </ext:Button>
                        
                        <ext:Button runat="server" ID="bnInput" Text="入库" Icon="PackageIn" ConfirmIcon="Warning" ConfirmText="进货单入库后，则不能修改，请确认保存数据再入库，确认入库？" ConfirmTitle="入库确认" OnClick="bnInput_Click"></ext:Button>
                        <ext:Button runat="server" ID="bn_Total" Icon="Coins" Text="结算"  OnClick="bn_Total_Click">
                        </ext:Button>
                        <ext:Button runat="server" ID="bnClose" Icon="SystemClose" Text="关闭">
                        </ext:Button>                     
                    </Items>
                </ext:Toolbar>
            </Toolbars>
        
                <ext:Form runat="server" ID="SimpleForm1" AutoHeight="true" AutoScroll="false"  EnableBackgroundColor="true"  ShowBorder="true" ShowHeader="false" BodyPadding="5px" AutoWidth="true" >
                    <Rows>
                        <ext:FormRow>
                            <Items>
                                <ext:TextBox runat="server" ID="tb_BBill_Code" Label="进货单号" Width="200px" Required="true" ShowRedStar="true" MaxLength="100" TabIndex="1"></ext:TextBox>                                     
                                <ext:DropDownList runat="server" ID="ddl_BBill_Supp_Id"  Label="供应商" Width="200px" CompareValue="-1" CompareOperator="NotEqual" DataValueField="Supp_Id" DataTextField="Supp_Name" Required="true" ShowRedStar="true" TabIndex="2"></ext:DropDownList>                      
                            </Items>
                        </ext:FormRow>
                        <ext:FormRow>
                            <Items>
                                <ext:DatePicker runat="server" ID="tb_BBill_Date" Label="进货日期"  Width="200px"  Required="true" ShowRedStar="true" TabIndex="3"></ext:DatePicker>
                                <ext:DropDownList runat="server" ID="ddl_BBill_SUser_Id" Label="经办人" Width="200px" DataValueField="SUser_Id" DataTextField="SUser_Name" Required="true" ShowRedStar="true" CompareValue="-1" CompareOperator="NotEqual" TabIndex="4"></ext:DropDownList>           
                                
                            </Items>
                        </ext:FormRow>
                        <ext:FormRow>
                            <Items>
                                <ext:Label runat="server" ID="tb_BBill_Input" Label="入库标志"  Width="200px" EncodeText="false"></ext:Label>      
                                <ext:Label runat="server" ID="tb_BBill_State" Label="结算状态"  Width="200px" EncodeText="false"></ext:Label>      
                            </Items>
                        </ext:FormRow>
                    </Rows>  
                </ext:Form>
                <ext:Form runat="server" ID="Form2" AutoHeight="true" AutoScroll="false" EnableBackgroundColor="true" EnableCollapse="true"  
            ShowBorder="true" ShowHeader="true"  BodyPadding="5px" Title="更多信息" AutoWidth="true" > 
            <Rows>
             <ext:FormRow >
                    <Items>
                          <ext:DropDownList runat="server" ID="ddl_BBilll_PayType" Label="结算方式" Width="200px"    DataValueField="Id" DataTextField="Name" OnSelectedIndexChanged="ddl_SBill_PayTypeSelectedChanged" AutoPostBack="true" TabIndex="5"></ext:DropDownList>
                           <ext:DropDownList runat="server" ID="ddl_BBill_AList_Id" Label="结算帐户" Width="200px"  TabIndex="6"  DataValueField="AList_Id" DataTextField="AccountInfo"></ext:DropDownList>
                    </Items>
                </ext:FormRow>
   
                        <ext:FormRow>
                            <Items>
                                <ext:TextBox runat="server" ID="tb_BBill_Count" Label="数量"  Enabled="false"  Width="200px" MaxLength="100"></ext:TextBox>
                                <ext:TextBox runat="server" ID="tb_BBill_Money" Label="总额"  Enabled="false" Width="200px" MaxLength="100"></ext:TextBox>
                                
                            </Items>
                        </ext:FormRow> 
                <ext:FormRow>
                    <Items>
                                <ext:TextBox runat="server" ID="tb_BBill_Memo" Label="备注" MaxLength="200"  Width="200px" TabIndex="7"></ext:TextBox>                                          
                        
                    </Items>
                </ext:FormRow>
                </Rows>
            </ext:Form>
                            <ext:SimpleForm ID="SimpleForm2" ShowBorder="true" ShowHeader="false" runat="server"
                BodyPadding="5px" EnableBackgroundColor="true" Title="新增产品" >
                <Toolbars>
                    <ext:Toolbar ID="Toolbar2" runat="server">
                        <Items>
                            <ext:Label ID="lblTitle1" runat="server" Text="新增产品" CssStyle="font-weight:bold;">
                            </ext:Label>
                            <ext:ToolbarFill ID="ToolbarFill1" runat="server">
                            </ext:ToolbarFill> 
                            <ext:Button ID="btnAdd" Text="添加" runat="server" Icon="Add" OnClick="btnAdd_Click" ValidateForms="SimpleForm2">
                            </ext:Button>
                            <ext:Button ID="btnCancle" Text="取消" runat="server" Icon="Cancel" Hidden="true" OnClick="btnCancel_Click">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Items>
                    <ext:ContentPanel ID="ContentPanel2" runat="server" EnableBackgroundColor="true"
                        ShowBorder="false" ShowHeader="false">
                        <table width="100%" border=0>
                            <tr> 
                                <td width="300">产品名称</td>
                                <td width="60">数量</td>
                                <td width="60">单价</td>
                                <td width="60" style="display:none">金额</td> 
                                <td width="60">零售价</td>
                            </tr>
                            <tr> <td> <ext:TriggerBox Width="300px" EnableEdit="false" runat="server" ID="tb_BBDeta_PInfo_Id" TriggerIcon="Search" EnablePostBack="false" Required="true" TabIndex="8"></ext:TriggerBox>
                                    


                                    


                                    


                                    <ext:HiddenField ID="hf_BBDeta_PInfo_Id" runat="server">
                                    </ext:HiddenField>





</td>
                                <td><ext:NumberBox runat="server" ID="nb_BBDeta_Count" Required="true" DecimalPrecision="0" TabIndex="9"></ext:NumberBox>





</td>
                                <td><ext:NumberBox runat="server" ID="nb_BBDeta_CostPrice" Required="true" DecimalPrecision="0" TabIndex="10"></ext:NumberBox>





</td>
                                <td style="display:none"><ext:NumberBox runat="server" ID="nb_BBDeta_Money" Required="true" Enabled="false" DecimalPrecision="0" TabIndex="11"></ext:NumberBox>





</td> 
                                <td><ext:NumberBox runat="server" ID="nb_BBDeta_Price" Required="true"  DecimalPrecision="0" TabIndex="12"></ext:NumberBox>





</td>  
                            </tr>
                        </table>
                    </ext:ContentPanel>
                </Items>
            </ext:SimpleForm>
                <ext:Grid runat="server" ID="gv_List" EnableBackgroundColor="true" Title="进货单明细"  DataKeyNames="BBDeta_Id,BBDeta_PInfo_Id,PInfo_Code" EnableRowNumber="true"  IsDatabasePaging="true"  AllowPaging="true" AutoHeight="true"  OnRowCommand="gv_List_RowCommand" PageSize="10" OnPageIndexChange="gv_List_PageIndexChange" >            
    <Columns>
        <ext:BoundField ColumnID="PInfo_Code" DataField="PInfo_Code" DataTooltipField="PInfo_Code" HeaderText="产品编码" Width="100px" />
        <ext:BoundField ColumnID="PInfo_Name" DataField="PInfo_Name" DataTooltipField="PInfo_Name" HeaderText="产品名称"   Width="100px"/> 
        <ext:BoundField ColumnID="PSort_Name" DataField="PSort_Name" DataTooltipField="PSort_Name" HeaderText="产品类型"   Width="100px"/> 
        <ext:BoundField ColumnID="BBDeta_Count" DataField="BBDeta_Count" DataTooltipField="BBDeta_Count" HeaderText="数量"   Width="50px"/> 
        <ext:BoundField ColumnID="BBDeta_CostPrice" DataField="BBDeta_CostPrice" DataTooltipField="BBDeta_CostPrice" HeaderText="单价"   Width="60px"/> 
        <ext:BoundField ColumnID="BBDeta_Money" DataField="BBDeta_Money" DataTooltipField="BBDeta_Money" HeaderText="金额"   Width="60px"/> 
        <ext:BoundField ColumnID="BBDeta_Price" DataField="BBDeta_Price" DataTooltipField="BBDeta_Price" HeaderText="零售价"   Width="60px"/> 
        <ext:LinkButtonField ColumnID="eidt" CommandName="edit"  Text="编辑" HeaderText="编辑" Width="60px" />           
        <ext:LinkButtonField ColumnID="delete" CommandName="Delete"  ConfirmIcon="Question" ConfirmText="确认删除此信息？" Text="删除" HeaderText="删除" Width="60px"/>
    </Columns>
    </ext:Grid>
           <ext:Window runat="server" ID="win_Content" Popup="false" EnableIFrame="true"  EnableConfirmOnClose="true" Title="选择产品" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="730px" Height="550px" EnableMaximize="true"></ext:Window>
           <ext:Window runat="server" ID="win_Import" Popup="false" EnableIFrame="true"  EnableConfirmOnClose="true" Title="进货单导入" IFrameUrl="about:blank" Target="Top" IsModal="true" Width="800px" Height="600px" EnableMaximize="true">           
           </ext:Window> 
               <ext:Window runat="server" ID="win_Confirm" IsModal="true" EnableDrag="true"  EnableClose="true" Height="250px" Width="400px" Hidden="true"  Layout="Absolute" IFrameUrl="" EnableIFrame="true"  >
               </ext:Window>
    </div>
    </form>
</body>
</html>
